USE [Training]
GO

IF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.training_api_SkillSelect'))
	EXEC('CREATE PROC dbo.training_api_SkillSelect AS')
GO

ALTER PROC dbo.training_api_SkillSelect
	@SkillID	int = null
AS
	SELECT
		SkillID,
		Title,
		DocID
	FROM Skill
	WHERE
		(@SkillID IS NULL OR(SkillID =  @SkillID))
